const Sequelize = require('sequelize');
const sequelize = require('../mysql/mysql');


const Food = sequelize.define('food', {
    id: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        autoIncrement: true,
    },
    name: {
        type: Sequelize.STRING,
        allowNull: false,
    },
    need: {
        type: Sequelize.STRING,
        defaultValue: null,
    },
    imageurl: {
        type: Sequelize.STRING(1024),
        defaultValue: null,
    },
    type: {
        type: Sequelize.STRING(1024),
        defaultValue: null,
    },
}, {
    tableName: 'foods',
    timestamps: false
});


// User.sync({force:true});

module.exports = Food;
